{extends file="./main.tpl"}
{block name=head}
<style>
  .loanFont
  {
    font-size:22px;
  }
</style>
<script src="js/jquery.min.js" ></script>
<script type="text/javascript" src="js/addOn.js"></script>		
{/block}
{block name=body}
<form name="loanAddOn" id="loanAddOn" action="{$smarty.server.PHP_SELF}" method="post">
  <table cellpadding="2" cellspacing="0" border="0" align="center">
    <input type="hidden" name="createFromId" value="{$createFrom}">
    <input type="hidden" name="itemImage" value="{$loanArray.itemImage}">
    <input type="hidden" name="loanId" value="{$loanArray.loanId}">
    <input type="hidden" name="addOnLoanId" value="{$loanArray.addOnLoanId}">
    <tr>
      <td align="right" valign="top" >
  	    <table cellpadding="2" cellspacing="0" border="1">
  	      <tr>
  	        <td colspan="2" align="center">
  	        	<h1><font size="6px">Loan Entry</font></h1>
  	        </td>
  	      </tr>
  	      <tr class="loanFont">
            <th align="right">Party : </th>
            <td>
            	<input type="hidden" name="partyIdtxt" value="{$loanArray.partyId}">
              <select name="partyNameSel" id="partyNameSel" disabled=disabled>
                <option value="0">-- New Party --</option>
                {html_options values=$arrParty.partyId  output=$arrParty.partyName selected=$loanArray.partyId}
              </select>
            </td>
          </tr>
          <tr class="loanFont">
            <th align="right">Value : </th>
            <td><input type="text" name="value" placeholder="Value" value="{$loanArray.value}"></td>
            <td><input type="hidden" name="itemIdtxt" value="{$loanArray.itemId}"></td>
          </tr>
          <tr class="loanFont">
            <th align="right"> Total Loan On This Item : </th>
            <td><input type="text" required=required name="loadAmount" id="loanAmount" value="{$loanArray.loanAmount}" onblur="countDays();" placeholder="Enter Loan Amount"></td>
          </tr>
          <tr class="loanFont">
            <th align="right">Add On Amount : </th>
            <td><input type="text" required=required name="addOnAmount" id="addOnAmount" onblur="interest();" onblur="countDays();" placeholder="Enter Add On Amount"></td>
          </tr>
          <tr class="loanFont">
            <th align="right">Item : </th>
            <td><input type="text" required=required name="item" id="item" value="{$loanArray.itemName}" ></td>
          </tr>
          <tr class="loanFont">
            <th align="right">Weight : </th>
            <td><input type="text" required=required name="weight" id="weight" value="{$loanArray.weight}" ></td>
          </tr>
          <tr class="loanFont">
            <th align="right">Item Image : </th>
            <td>
              <img src="loanUplodeadImages/{$loanArray.itemImage}" width="80" height="60">
              <input type="hidden" name="img" value="{$loanArray.itemImage}" >
            </td>
          </tr>
          <tr class="loanFont">
            <th align="right">Date : </th>
            <td NOWRAP >{html_select_date prefix='curDate' field_order="DmY" month_format="%m" start_year='-5' end_year='+5' time=$loanArray.loanDate}</td>
          </tr>
          <tr class="loanFont">
            <th NOWRAP align="right">Monthly Interest % : </th>
            <td><input type="text" name="monthlyInterest" id="monthlyInterest" onblur="interest();" value="{$loanArray.monthlyInterest}" ></td>
          </tr>
          <tr class="loanFont">
            <th NOWRAP align="right">Monthly Interest Rs : </th>
            <td><input type="text" name="monthlyInterestRs" id="monthlyInterestRs"" value="{$loanArray.monthlyInterestRs}" ></td>
          </tr>
        </table> 
      </td>
      <td align="left" valign="top" class="partyData"></td>
    </tr>
    <tr>
      <td colspan="2">
        <input type="reset" name="reset" id="reset" value="Reset" style="height:50px; font-size:20px;">
        <input type="submit" name="loanBtn" id="loanBtn" value="Save" style="height:50px; font-size:20px;">
      </td>
    </tr>
  </table>
  <input type="hidden" name="loanVar" value="{$loanArray.loanVar}" >
  <input type="hidden" name="loanVarNo" value="{$loanArray.loanVarNo}" >
</form> 
{/block}
